package com.ruoyi.logCen.controller;

import com.ruoyi.logCen.domain.LogInfo;
import com.ruoyi.logCen.service.LogInfoService;

import javax.annotation.Resource;
import java.util.Map;

public class HandleKafkaLogMsg {

    @Resource
    private LogInfoService logInfoService;

    public void handleMessage(Map<String, Object> msg){

        LogInfo logInfo = new LogInfo(msg.get("ip").toString(), msg.get("logPath").toString());

        logInfo = logInfoService.selectOne(logInfo);

        System.out.println(logInfo.toString());

    }
}
